<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> 
<html>
<head>
<title>start</title>
</head>
    <link id="editCss" rel="stylesheet" type="text/css" href="<%=path%>/css/right.css" />
<script type="text/javascript">
function search(favoriteId,path,title){
	top.popUp(	'searchView', 
				'来自【 '+title+" 】的火线资讯！！",
				"<%=path%>/zebra/customer/search/SearchAction?method=search&favoriteId="+favoriteId+"&path="+path,
				600,
				430,
				function() {}
			);
}

function showKeywordLis(websiteId,monitorTypeId,id){
	top.popUp('keywordList', '关键字列表',
			"<%=basePath%>/zebra/customer/favorite/FavoriteAction?method=toAddFavorite&id="+id+"&monitorTypeId="+monitorTypeId+"&websiteId="+websiteId, 400, 330,function() {});
}
</script>
<body>
<div class="tableBox" style="background:#556272;">
	<table border="0" cellspacing="0" cellpadding="0" style="width:100%;">
		<tr>
			<th>序号</th>
			<th>监控类型</th>
			<th>监控状态</th>
			<th>站点标题</th>
			<th>站点路径</th>
			<th>操作</th>
		</tr>
		<c:if test="${!empty favoriteList }">
		<c:forEach items="${favoriteList}" var="favorite" varStatus="index">
		<tr>
			<td>${index.count}</td>
			<c:choose>
				<c:when test="${favorite.isStart == 1}">
					<td>
						<a href="<%=path%>/zebra/customer/favorite/FavoriteAction?method=toInner&monitorTypeId=${favorite.monitorTypeId}">${favorite.type}</a>
					</td>
					<td>
						启动
					</td>
				</c:when>
				<c:otherwise>
					<td>${favorite.type}</td>
					<td>暂停</td>
				</c:otherwise>
			</c:choose>
			<td>${favorite.title}</td>
			<td>${favorite.path}</td>
			<td>
				<input type="button" class="button" value="查看资讯"
						onclick="search(${favorite.id},'${favorite.path }','${favorite.title}')"> 
				
				<input type="button" class="button" value="维护关键字"
						onclick="showKeywordLis(${favorite.websiteId},${favorite.monitorTypeId},${favorite.id})"> 
				
				<a href="<%=path %>/zebra/customer/favorite/FavoriteAction?method=del&id=${favorite.id}">
					<img src="<%=path%>/images/icon/list_del.gif" />取消收藏
				</a> 
			</td>
		</tr>
		</c:forEach>
		</c:if>
	</table>
</div>
</body>
</html>
